<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/Barcode for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Barcode\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\Barcode\Barcode;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
       /**
        * code 的类型有如下几种
        * Error
        * Code128
        * Codabar
        * Code25
        * Code25interleaved
        * Ean2
        * Ean5
        * Ean8
        * Ean13
        * Identcode
        * Ltf14
        * Leitcode
        * Planet
        * Postnet
        * Royalmail
        * Upca
        * Upce
        */
        
        
        
        $barCodeOptions = array('text' => 'ABCDEFG');
        $renderOptions = array();
        Barcode::factory('royalmail', 'image', $barCodeOptions, $renderOptions)->render();
        return array();
    }

    public function fooAction()
    {
        // This shows the :controller and :action parameters in default route
        // are working when you browse to /index/index/foo
        return array();
    }
}
